package com.cheegu.common.parser.gpsdata.packet.boshijie;

/**
 * 说明
 *
 * @author zhangxh
 * @email zhangxh@cheegu.com
 * @date 2018/3/22 11:55
 */
public enum BoShiJieCmdType {
    Unknown(0),
    /**
     * 中心确认包
     */
    CenterResponse(0x21),
    /**
     * 定时定次回传
     */
    FixedTimeFixedCntReport(0x7B),
    /**
     * 下发调度文本
     */
    SendDispatchText(0x3A),
    /**
     * 终端复位重启
     */

    TerminalReset(0x32),
    /**
     * 一般位置数据
     */
    ReportLocation(0x80),
    /**
     * 终端确认包
     */
    TerminalResponse(0x85),
    /**
     * 上发便携终端校时协议
     */
    ReportCheckTimeProtocol(0xD6),
    /**
     * 上发申请设置参数
     */
    ReportApplySetPara(0xD8),
    /**
     * 恢复油路
     */
    RestoreElectrical(0x38),
    /**
     * 下发油油路命令
     */
    BreakElectrical(0x39),
    /**
     * 远程开门
     */
    RemoteOpenDoor(0x67),
    /**
     * 远程锁门
     */
    RemoteLockDoor(0x68);
    private int BoShiJieCmdTypeValue;


    public int getBoShiJieCmdTypeValue() {
        return BoShiJieCmdTypeValue;
    }

    BoShiJieCmdType(int i) {
        BoShiJieCmdTypeValue = i;
    }

    public static BoShiJieCmdType valueOf(int value) {
        switch (value) {
            case 0x67:
                return RemoteOpenDoor;
            case 0x68:
                return RemoteLockDoor;
            case 0x39:
                return BreakElectrical;
            case 0x38:
                return RestoreElectrical;
            case 0xD8:
                return ReportApplySetPara;
            case 0xD6:
                return ReportCheckTimeProtocol;
            case 0x85:
                return TerminalResponse;
            case 0x32:
                return TerminalReset;
            case 0x3A:
                return SendDispatchText;
            case 0x7B:
                return FixedTimeFixedCntReport;
            case 0x21:
                return CenterResponse;
            case 0x80:
                return ReportLocation;
            default:
                return Unknown;
        }
    }

}
